package top.lyc829.mymusic.ext

/**
 * 获取大树的模糊表述
 * @Author lyc
 * @create 2021-07-15 19:36
 */
val Long.getCorrespondString : String
    get() {
        val text: String
        var num = this
        //大于1亿
        when {
            num > 100000000 -> {
                num /= 100000000
                text = num.toString() + "亿"
                //大于10万
            }
            num >= 100000 -> {
                num /= 10000
                text = num.toString() + "万"
            }
            else -> {
                text = num.toString() + ""
            }
        }
        return text
    }
